const Base = require('./base.js');

module.exports = class extends Base {
	constructor(ctx) {
		super(ctx);
		this.queue = this.model("taoke/queue");

	}
	async indexAction() {
		if(this.isGet) {
			return this.display();
		}

		let posts = this.post();
		let where = {};
		if(!think.isEmpty(posts.order_sn)) {
			where.order_sn = ['like', '%' + posts.order_sn + '%'];
		}

		let fields = "id,order_sn,user_id,create_time";
		const data = await this.queue.joinUserTable(posts, where, fields);
		return this.json(data);

	}


};